package org.yscz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: pe
 * @description: 测评记录表
 * @author: muqs
 * @create: 2021-08-24 10:08
 **/
@Data
@ToString
@Accessors(chain = true)
@TableName(value = "t_record")
public class Record implements Serializable {

    /**
     * 测评记录ID
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 测评记录开始就生成这个uuid
     */
    @TableField(value = "record_uuid")
    private String recordUuid;

    /**
     * 被测人姓名
     */
    @TableField(value = "record_testee_name")
    private String recordTesteeName;

    /**
     * 被测人性别 0-男 1-女
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 被测人年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 测评记录状态 0-未完成 1-已完成
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 暂停次数
     */
    @TableField(value = "stop_num")
    private Integer stopNum;

    /**
     * 评测时间（每次暂停以后的开始时间）
     */
    @TableField(value = "record_create_time")
    private String recordCreateTime;

    /**
     * 测评开始时间
     */
    @TableField(value = "record_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date recordStartTime;

    /**
     * 测评结束时间
     */
    @TableField(value = "record_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date recordEndTime;

    /**
     * 答题时长
     */
    @TableField(value = "record_time")
    private String recordTime;

    /**
     * 当前测评进度（测评到第几题的试题编号）
     */
    @TableField(value = "question_num")
    private Integer questionNum;

    /**
     * 问题折线图数据
     */
    @TableField(value = "question_line")
    private String questionLine;

    /**
     * 时间折线图数据
     */
    @TableField(value = "time_line")
    private String timeLine;

    /**
     * 异常表情总数
     */
    @TableField(value = "exception_sum_num")
    private Integer exceptionSumNum;

    /**
     * 异常答题题目总数
     */
    @TableField(value = "exception_question_sum_num")
    private Integer exceptionQuestionSumNum;

    /**
     * 量表ID
     */
    @TableField(value = "scale_id_fk")
    private Long scaleIdFk;

    /**
     * 班级ID
     */
    @TableField(value = "testee_group_id_fk")
    private Long testeeGroupIdFk;

    /**
     * 用户ID
     */
    @TableField(value = "user_id_fk")
    private Long userIdFk;

    /**
     * 用户ID
     */
    @TableField(value = "testee_id_fk")
    private Long testeeIdFk;
}
